<html>
<body>
<h1>Klant/Bestelgegevens</h1>
<?php
require('../connect_db.php');

$bestelklant_result = mysql_query("SELECT kb.Bestelid, kb.Klantid, k.Voornaam, k.Achternaam, k.Adres, k.Postcode, k.Plaats, k.Telefoonnummer, k.Emailadres  FROM klantbestel as kb, klantgegevens as k WHERE k.klantnr=kb.klantid");

echo "<table border='1'>
	<tr>
			<td width='150' align='center'><strong>Bestelid</strong></td>
			<td width='150' align='center'><strong>Klantid</strong></td>
			<td width='150' align='center'><strong>Voornaam</strong></td>
			<td width='150' align='center'><strong>Achternaam</strong></td>
			<td width='150' align='center'><strong>Adres</strong></td>
			<td width='150' align='center'><strong>Postcode</strong></td>
			<td width='150' align='center'><strong>Plaats</strong></td>
			<td width='150' align='center'><strong>Telefoonnummer</strong></td>
			<td width='150' align='center'><strong>Emailadres</strong></td>
			<td width='150' align='center'><strong>Wijzigen</strong></td>
			
	</tr>";
	
while($bestelklant_row = mysql_fetch_array($bestelklant_result))
	{
		$Bestelid = $bestelklant_result['Bestelid'];
		echo "<tr>
					<td align='left'>".$bestelklant_row['Bestelid']."</td>
					<td align='left'>".$bestelklant_row['Klantid']."</td>
					<td align='left'>".$bestelklant_row['Voornaam']."</td>
					<td align='left'>".$bestelklant_row['Achternaam']."</td>
					<td align='left'>".$bestelklant_row['Adres']."</td>
					<td align='left'>".$bestelklant_row['Postcode']."</td>
					<td align='left'>".$bestelklant_row['Plaats']."</td>
					<td align='left'>".$bestelklant_row['Telefoonnummer']."</td>
					<td align='left'>".$bestelklant_row['Emailadres']."</td>
					<td align='center'>".$wijzigen= "<a href='Bestelgegevens_wijzigenw.php?id=. $Bestelid .'>".'<img src="http://www.esteriann.nl/Kladblok.jpg" img border = "0" width="32" height="32" />'."</td>

			
					</tr>";
	}
?>
</body>
</html>